home *** CD-ROM | disk | FTP | other *** search
/ Canadian Forces: Canada's NAVY / CF_FS_Navy.iso / pc / data / 0_04_en.dxr / 00004_MPEG Advance Xtra Controller Button.ls < prev    next >
Encoding:
Text File  |  2005-06-08  |  3.1 KB  |  58 lines

  1. property videoSprite, VideoCommand, standardImage, alternateImage, clickedImage, param1, param2
  2.  
  3. on DoControl me
  4.   case me.VideoCommand of
  5.     #play:
  6.       play frame sprite(me.videoSprite)
  7.     #pause:
  8.       pause(sprite(me.videoSprite))
  9.     #rewind:
  10.       seek(sprite(me.videoSprite), sprite(me.videoSprite).member.startTime)
  11.     #stepforward:
  12.       stepforward(sprite(me.videoSprite))
  13.     #stepback:
  14.       stepback(sprite(me.videoSprite))
  15.     #seek:
  16.       seek(sprite(me.videoSprite), me.param1)
  17.     #playsegment:
  18.       playsegment(sprite(me.videoSprite), me.param1, me.param2)
  19.   end case
  20. end
  21.  
  22. on mouseUp me
  23.   sprite(me.spriteNum).member = me.standardImage
  24.   DoControl(me)
  25. end
  26.  
  27. on mouseDown me
  28.   sprite(me.spriteNum).member = me.clickedImage
  29. end
  30.  
  31. on mouseEnter me
  32.   sprite(me.spriteNum).member = me.alternateImage
  33. end
  34.  
  35. on mouseLeave me
  36.   sprite(me.spriteNum).member = me.standardImage
  37. end
  38.  
  39. on beginSprite me
  40.   me.standardImage = sprite(me.spriteNum).member
  41. end
  42.  
  43. on getPropertyDescriptionList me
  44.   if the currentSpriteNum = 0 then
  45.     memdefault = 0
  46.   else
  47.     memref = sprite(me.videoSprite).member
  48.     memdefault = member(member(memref).memberNum + 1)
  49.     memdefault2 = member(member(memref).memberNum + 2)
  50.   end if
  51.   p_list = [#VideoCommand: [#comment: "Action:", #format: #symbol, #range: [#play, #pause, #rewind, #stepback, #stepforward, #seek, #playsegment], #default: #play], #param1: [#comment: "First Parameter (Use with seek or playsegment):", #format: #long, #default: 0], #param2: [#comment: "Second Parameter (Use with playsegment):", #format: #long, #default: 0], #videoSprite: [#comment: "MPEG Advance Xtra Sprite Channel:", #format: #integer, #default: 1], #alternateImage: [#comment: "Rollover Button Cast Member:", #format: #graphic, #default: memdefault], #clickedImage: [#comment: "Clicked Button Cast Member:", #format: #graphic, #default: memdefault2]]
  52.   return p_list
  53. end
  54.  
  55. on getBehaviorDescription
  56.   return "Used to create Play, Pause, StepForward, StepBack, Rewind, Seek and PlaySegment control buttons for MPEG Advance Xtra video sprites. You can also attach rollover and alternate images for the clicked buttons" & RETURN & "PARAMETERS:" & RETURN & "Action - Choose the action to perform on mouseUP ( Play, Pause, Rewind, StepBackward, StepForward, Seek, PlaySegment )." & RETURN & "First Parameter: if the Action is Seek than this parameter contains the seek to time (in milliseconds). For the PlaySegment action this parameter contains the starting time of the segment to play (in milliseconds)" & RETURN & "Second Parameter: Used with the PlaySegment action. Contains the ending time of the segment to play (in milliseconds)" & RETURN & "DirectMedia Sprite Channel - Enter the number of sprite channel of the MPEG Advance Xtra video that is being controlled." & RETURN & "Rollover Button: the castmember that will be used as the rollover image of the button. Default is the castmember located just after the button castmember" & RETURN & "Clicked Button: the castmember that will be used as the clicked image of the button. Default is the castmember located just after the rollover castmember"
  57. end
  58.